package com.parfinex.java.phase1.module2.code.communicate;
/**
 * @author lijiahui
 * @date ${DATE} ${TIME}
 * @version 1.0
 * 编程实现手机卡类的定义
 * */

public class MobilePhone {
    //1.自定义私有成员变量手机卡类
    private String cardType;//自定义私有成员变量卡类型
    private String cardNo;//自定义私有成员变量卡号
    private String userName;//自定义私有成员变量用户名
    private String password;//自定义私有成员变量密码
    private float accountBalance;//自定义私有成员变量账户余额
    private int callDuration;//自定义私有成员变量通话时间，以分钟为单位，1-59秒都算一分钟
    private int internetTraffic;//自定义私有成员变量上网流量
    //3.定义构造方法

    public MobilePhone() {
    }

    public MobilePhone(String cardType, String cardNo, String userName, String password, float accountBalance, int callDuration, int internetTraffic) {
        this.cardType = cardType;
        this.cardNo = cardNo;
        this.userName = userName;
        this.password = password;
        this.accountBalance = accountBalance;
        this.callDuration = callDuration;
        this.internetTraffic = internetTraffic;
    }

    //2.定义get和set方法
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public float getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(float accountBalance) {
        this.accountBalance = accountBalance;
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getInternetTraffic() {
        return internetTraffic;
    }

    public void setInternetTraffic(int internetTraffic) {
        this.internetTraffic = internetTraffic;
    }
    //4.显示卡号+用户名+当前余额
    public void show(){}
    public void show(String cardNo,String userName,float accountBalance){
        System.out.println("当前卡号为："+cardNo+",用户名为："+userName+",当前余额为："+accountBalance);

    }
}
